# Maintainer: Maxime Gauduin <alucryd@archlinux.org>

pkgname=python-dbus-fast
pkgver=1.84.2
pkgrel=2
pkgdesc='A faster version of dbus-next'
arch=(any)
url=https://github.com/bluetooth-devices/dbus-fast
license=(MIT)
depends=(
  dbus
  glib2
  python
)
makedepends=(
  cython
  git
  python-async-timeout
  python-build
  python-installer
  python-poetry-core
  python-setuptools
  python-wheel
)
checkdepends=(
  python-pytest
  python-pytest-asyncio
  python-pytest-cov
  python-pytest-timeout
)
_tag=5d5502283d714c3abac8c70d8127a616c9cd9bb3
source=(git+https://github.com/Bluetooth-Devices/dbus-fast.git#tag=${_tag})
b2sums=(SKIP)

pkgver() {
  cd dbus-fast
  git describe --tags | sed 's/^v//'
}

build() {
  cd dbus-fast
  python -m build --wheel --no-isolation
}

#check() {
#  cd dbus-fast
#  dbus-run-session -- pytest -v
#}

package() {
  python -m installer --destdir="${pkgdir}" dbus-fast/dist/*.whl
  install -Dm 644 dbus-fast/LICENSE -t "${pkgdir}"/usr/share/licenses/python-dbus-fast/
}

# vim: ts=2 sw=2 et:
